<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
		<meta charset="UTF-8">
		<title>Login</title>
		<link rel="stylesheet" href="css/yjw/login.css" />
		<script src="js/jquery-3.3.1.min.js"></script>
		<script type="text/javascript" src="js/yjw/login.js" ></script>		
	</head>
	<body>
		<!--总体-->
		<div class="all"></div>
		
		<!--头部-->
		<div class="head">
			<img src="img/yjw/login/yjwhuaweiLogo.png" class="headImage" />
			<span class="headVertical">|</span>
			<span class="headHwsc">华为商城</span>
		</div>
		
		<!--中部-->
		<div class="middle">
			<div class="middleLogin">
				<div class="loginChose">
					<span class="choseNumber">账号登录</span>
					<span class="choseVertical">|</span>
					<span class="choseScan">扫码登录</span>
				</div>
				
				<!--账号登录页面-->
				<div class="numberPage">
					<form action="#" method="post">
						<ul style="list-style-type: none;">
							<li class="numberPageOne">
								<input id="userTelOrMail" type="text" placeholder="手机号、邮件地址" class="numberNum" style="onClick="this.style.color='black';this.value='';" onBlur="this.style.color=''"/>
								<hr class="numberHrOne" />
							</li>
							<li class="numberPageTwo">
								<input id="userPsw" type="password" placeholder="密码" class="numberPassword" style="onClick="this.style.color='black';this.value='';" onBlur="this.style.color=''"/>
								<hr class="numberHrTwo" />
							</li>
							<li class="numberPageThree">
								<img src="img/yjw/login/yjw_phonemin.png" class="numberPhoneImg" />
								<span class="numberMassgae">短信验证码登录</span>
							</li>
							<li class="numberPageFour">
								<input type="button" class="numberLogin" value="登录" onclick="login()"/>
							</li>
							<li class="numberPageFive">
								<label class="chk-label">
									<input type="checkbox" class="chk"/>
									<span></span>
									<font>记住华为账号</font>
									<img src="img/yjw/login/yjw_dhk.png"  class="numberPopUp"/>
								</label>
								<span class="numberMore">更多</span>
							</li>
							<li class="numberPageSix">
								<span class="numberLoginNum"><a href="#" title="注册账号" style="color: #007DFF;">注册账号</a></span>
								<span class="numberSixVertical">|</span>      
								<span class="numberForgetPsw"><a href="#" title="忘记密码" style="color: #007DFF;">忘记密码</a></span> 
							</li>
							<li class="numberPageSeven">
								<img src="img/yjw/login/yjw_qtdl.png" class="numberLoginMethod"/>
								<div class="iconAll">
									<img src="img/yjw/login/yjw_icon.png" class="icon" /><span class="qq_span"></span>
									<img src="img/yjw/login/yjw_icon.png" class="icon" /><span class="zfb_span"></span>
									<img src="img/yjw/login/yjw_icon.png" class="icon" /><span class="wx_span"></span>
								</div>
							</li>
						</ul>
					</form>
				</div>
				
				<!--扫码登录页面-->
				<div class="scanPage">
					<ul style="list-style-type: none;">
						<li class="scanPageOne">
							<div class="scan">
								<img src="img/yjw/login/yjw_smlogin.png" class="QRcode"/>
								<img src="img/yjw/login/yjw_smphone.png" class="smphone" />
							</div>
						</li>
						<li class="scanPageTwo">
							<span class="scanAnnotation1">使用<span style="color: #007DFF;">华为移动服务APP</span>扫一扫</span>
							<span class="scanAnnotation2">若您使用华为手机，请进入"设置">"华为账号"扫码登录。</span>
						</li>
					</ul>
				</div>
				
			</div>
		</div>
		
		<!--尾部-->
		<div class="tail">
			<ul style="list-style-type: none;">
				<li class="tailFirstLine">
					<span class="tailOne1">华为账号用户协议</span>
					<span class="tailShu1">|</span>
					<span class="tailOne2">关于华为账号与隐私的说明</span>
					<span class="tailShu2">|</span>
					<span class="tailOne3">常见问题</span>
				</li>
				<li class="tailSecondLine">
					<span class="tailTwo1">Copyright&nbsp;&nbsp;011-2018&nbsp;华为软件技术有限公司&nbsp;版权所有&nbsp;保留一切权利&nbsp;苏B2-20070200号&nbsp;|&nbsp;苏ICP备09062682号-9</span>
					<span class="tailTwo2">&#169;</span>
				</li>
			</ul>
		</div>
		
		<script type="text/javascript">
			var requestURI='${requestURI}';
			console.log("进入登录页面");
			console.log(requestURI);
			function login(){
				var telOrMail = jQuery("#userTelOrMail").val();
				var psw = jQuery("#userPsw").val();
				//alert(telOrMail+":"+psw);
				$.get("Login?method=login",{userTelOrMail:telOrMail,userPsw:psw},function(e){
					if(e=="1"){
						if(requestURI==null||requestURI==""){
							window.location.href="Main";
						}
						else{
							window.location.href=requestURI;
						}
						
					}
					else{
						alert("登陆失败");
					}
				});
			}
		
		
		</script>
		
	</body>
</html>